<?php
session_start();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="cs"> 
<head>
   <link rel="stylesheet" type="text/css" href="css/css.css"/> 
 <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
 <title>Detaili</title>
<style>
   .modra{background-color:red;}
   .oranz{background-color:orange;}
   .ruz {background-color:pink;}
   .cer{color:red;}
   table,td{border:1px solid black;}
</style> 

</head>
<body>
 
 <p>Nyní jste v administraci, přihlášen jako <b><?php echo $_SESSION['jmeno'] ?></b>.</p>
<div id="global"><!-- Začátek Global -->
<h2>BITWA Petr Šmíd</h2>
<div id="hlavicka"><!-- Začátek hlavičky -->

</div><!-- Konec hlavičky -->
<div id="menu1"><!-- Začátek menu -->
<div id="banner1">
<h2>Další stránky</h2>

<a href="bmi.php">Nový test</a>
<a href="hledani.php">Moje Testy</a>
<a href="index.php">Odhlásit</a>


</div>
</div>
<div id="obsah"> 
 




<?php      
$con=mysql_connect("localhost", "smidpet5", "aez9okai");
// Check connection
if (!$con)
  {
  echo "Failed to connect to MySQL: " . mysql_connect_error();
  }

// Create database
mysql_select_db("smidpet5");


 $id= $_SESSION['id'];
  echo"$id";
  $pp = $_REQUEST['pp'];
$mm = mysql_query("SELECT * FROM `BMIII` WHERE idd='$pp'", $con) ; 		
			                                                 
//$mm = mysql_query($query);
//$current=mysql_fetch_array($mm);
if (!$mm) {
		    echo "Chyba:".$current['id'];
		    return false;
			}	    
//mysql_close();
echo "<table>";echo "<tr>";echo "<th>";echo "Datum";echo "</th>";echo "<th>";echo "vaha vyska";echo "</th>";echo "</tr>";
	
			
while ($current=mysql_fetch_array($mm)){ 
			echo "<tr>";
			echo "<td>";
			echo $current["Datum"];
			echo "</td>";
			echo "<td>";
			echo $current["Vaha"];
			echo "</td>";
      echo "<td>";
			echo $current["Vyska"];
			echo "</td>";           
			echo "</tr>";			
		}
		
		echo "</table>";        
   


    
?>
</div><!-- Konec obsahu -->
</div> <!-- Konec Global -->
<div id="pata" style="text-align: center"> <!-- Začátek pata -->  
Úkol vypracoval: Petr Šmíd
</div><!-- Konec pata -->

</body>
</html>